Public Function validateFilepath(filepath As String) As Boolean
Validates that a specific filepath exists or can be created.
Rewrote this function to use an old W32 C API call (MakeSureDirectoryPathExists) to make sure the directory path exist
idx
Argument
Data Type
Attributes
Comments
1
filepath
String
Filepath to check
Code Sample
' example calling MakeSureDirectoryPathExists (used internally in method validateFilepath()
If Right(imgpath, 1) <> |\| Then imgpath = imgpath & |\| rlng = MakeSureDirectoryPathExists(imgpath) ' WinAPI call, in (Declarations) If rlng = 0 Then Error 1027, "Encountered a problem validating or creating the destination directory path for the new image"